﻿namespace _12_C_中new关键字的四种使用场景
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "C#中new关键字的四种使用场景";

            //new 实例化对象
            //Test1 test1=new Test1();

            //int a;
            //int b = new int();

            //Console.WriteLine(a);//异常
            //Console.WriteLine(b);

            //Test1 test1 = new Test2();
            //Test2 test2 = new Test2();

            //test1.Show();
            //test2.Show();

            //Test3<Test1> test3 = new Test3<Test1>();

            //test3.GetInstance().Show();

            MyTest1 test2 = new MyTest2();
            MyTest1 Test3 = new MyTest3();
            MyTest1 test4 = new MyTest4();

            test2.Show();
            Test3.Show();
            test4.Show();

            Console.ReadKey();
        }
    }
}
